package com.wkbb.basic.enums;

/**
 * @author lizhichao
 * @date 2019/11/13
 * @description
 */
public enum DeviceBoxOperateTypeEnum {

    //操作类型
    BOX_OPERATE_ADD_PERSON(1,"向巨龙盒子同步添加人员"),
    BOX_OPERATE_DELETE_PERSON(2,"从巨龙盒子删除人员");

    private Integer code;

    private String desc;

    DeviceBoxOperateTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    // 普通方法
    public static String getDesc(short code) {
        for (DeviceBoxOperateTypeEnum c : DeviceBoxOperateTypeEnum.values()) {
            if (c.getCode() == code) {
                return c.desc;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
